
using System.Text.RegularExpressions;

public class CustomRuleLoader
{
    public List<Regex> LoadCustomRules(string configFilePath)
    {
        var customPatterns = new List<Regex>();
        if (File.Exists(configFilePath))
        {
            foreach (var line in File.ReadAllLines(configFilePath))
            {
                try
                {
                    customPatterns.Add(new Regex(line));
                }
                catch (Exception ex)
                {
                    Console.WriteLine($"Invalid regex pattern: {line}. Error: {ex.Message}");
                }
            }
        }
        return customPatterns;
    }
} 